#abrazos-vue-designer
<style scoped>

</style>
<template>
  <div>
      <span>这里可能是很复杂的逻辑</span>
      <span>xxxxxxxxxx</span>
        <bForm ref="form" bill-root-name="name1" :model="marketing" label-position="right" :rules="ruleValidate" :label-width="110" >
            <field field-meta-id='marketing-name' type="string" field-label="活动主题" field-prop="name" v-model="marketing.name" :disabled="disabledName" col-span="12"></field>
            <field field-meta-id='marketing-type' type="dict" field-label="活动类型" validate-rules="[
                    { 
                        validator: validateName,
                        trigger: 'blur' ,
                        type: 'string',
                        required : true
                    },
                    {
                        max : 100,
                        trigger: 'blur',
                        message: '输入字数长度超过100'
                    }
                ]" field-prop="type" :dictName="'com.beecode.inz.crm.dict.MarketingTypeDict'" :dictType="'list'" v-model="marketingTypeId" col-span="12"></field>
            <field field-meta-id='marketing-date' field-label="开始日期" field-prop="startTime" :field-disabled="dateValidateDisabled" style="width:100%" type="date" placeholder="点击选择日期" v-model="marketing.startTime" :options="optionsStartDate" col-span="12"></field>
            <field field-meta-id='marketing-cost' field-meta-const='true' type="currency" field-label="预计成本" v-model="marketing.predictCost" :showUnit="true" :unit="unit" col-span="12"></field>
            <field field-meta-id='marketing-position' type="location" field-label="定位"  ref="locationRef" :lazyInit="true" v-model="newLocation" style="width:100%;" v-bind:on-change="setLocation" placeholder="请输入写字楼、街道、公司名称" col-span="24"></field>
        </bForm>
      <Button v-bind:click="click">清空选择</Button>
      <Select v-model="model1" style="width:200px">
        <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
    </Select>
        <bForm ref="form" bill-root-name="name2" :model="marketing" label-position="right" :rules="ruleValidate" :label-width="110" >
            <field field-meta-id='marketing-name' type="string" field-label="活动主题" field-prop="name" v-model="marketing.name" :disabled="disabledName" col-span="12"></field>
            <field field-meta-id='marketing-type' type="dict" field-label="活动类型" validate-rules="[
                    { 
                        validator: validateName,
                        trigger: 'blur' ,
                        type: 'string',
                        required : true
                    },
                    {
                        max : 100,
                        trigger: 'blur',
                        message: '输入字数长度超过100'
                    }
                ]" field-prop="type" :dictName="'com.beecode.inz.crm.dict.MarketingTypeDict'" :dictType="'list'" v-model="marketingTypeId" col-span="12"></field>
            <field field-meta-id='marketing-date' field-label="开始日期" field-prop="startTime" :field-disabled="dateValidateDisabled" style="width:100%" type="date" placeholder="点击选择日期" v-model="marketing.startTime" :options="optionsStartDate" col-span="12"></field>
            <field field-meta-id='marketing-cost' type="currency" field-label="预计成本" v-model="marketing.predictCost" :showUnit="true" :unit="unit" col-span="12"></field>
            <field field-meta-id='marketing-position' type="location" field-label="定位"  ref="locationRef" :lazyInit="true" v-model="newLocation" style="width:100%;" v-bind:on-change="setLocation" placeholder="请输入写字楼、街道、公司名称" col-span="24"></field>
        </bForm>


       <div>
    <span>这里可能是很复杂的逻辑</span>
    <span>xxxxxxxxxx</span>
    <bForm ref="form" bill-root-name="name1" :model="marketing" label-position="right" :rules="ruleValidate" :label-width="110">
        <field field-meta-id="marketing-type" type="dict" field-label="活动类型" validate-rules="[
            { 
                validator: validateName,
                trigger: 'blur' ,
                type: 'string',
                required : true
            },
            {
                max : 100,
                trigger: 'blur',
                message: '输入字数长度超过100'
            }
        ]" field-prop="type" :dictName="'com.beecode.inz.crm.dict.MarketingTypeDict'" :dictType="'list'" v-model="marketingTypeId" col-span="12"/>
        <field field-meta-id="marketing-cost" field-meta-const="true" type="currency" field-label="预计成本" v-model="marketing.predictCost" :showUnit="true" :unit="unit" col-span="12"/>
        <field field-meta-id="marketing-name" type="string" field-label="活动主题lalala" field-prop="name" v-model="marketing.name" :disabled="disabledName" col-span="12"/>
        <field field-meta-id="marketing-position" type="location" field-label="定位" ref="locationRef" :lazyInit="true" v-model="newLocation" style="width:100%;" v-bind:on-change="setLocation" placeholder="请输入写字楼、街道、公司名称" col-span="24"/>
    </bForm>
    <Button v-bind:click="click">清空选择</Button>
    <Select v-model="model1" style="width:200px">
        <Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
    </Select>
    <bForm ref="form" bill-root-name="name2" :model="marketing" label-position="right" :rules="ruleValidate" :label-width="110">
        <field field-meta-id="marketing-date" field-label="开始日期" field-prop="startTime" :field-disabled="dateValidateDisabled" style="width:100%" type="date" placeholder="点击选择日期" v-model="marketing.startTime" :options="optionsStartDate" col-span="12"/>
        <field field-meta-id="marketing-name" type="string" field-label="活动主题" field-prop="name" v-model="marketing.name" :disabled="disabledName" col-span="12"/>
        <field field-meta-id="marketing-position" type="location" field-label="定位" ref="locationRef" :lazyInit="true" v-model="newLocation" style="width:100%;" v-bind:on-change="setLocation" placeholder="请输入写字楼、街道、公司名称" col-span="24"/>
        <field field-meta-id="marketing-type" type="dict" field-label="活动类型" validate-rules="[
                { 
                    validator: validateName,
                    trigger: 'blur' ,
                    type: 'string',
                    required : true
                },
                {
                    max : 100,
                    trigger: 'blur',
                    message: '输入字数长度超过100'
                }
            ]" field-prop="type" :dictName="'com.beecode.inz.crm.dict.MarketingTypeDict'" :dictType="'list'" v-model="marketingTypeId" col-span="12"/>
    </bForm>
</div>
  </div>
</template>
<script>
import bfield from "./components/bfield";
import bform from "./components/bform";

export default {
  data() {
    return {
      model: {
        name: "my name"
      },
      ruleValidate: {
        name: [
          {
            required: true,
            trigger: "blur"
          },
          {
            max: 2,
            message: "输入字数长度超过2",
            trigger: "change"
          }
        ]
      },
      cityList: [
        {
          value: "New York",
          label: "New York"
        },
        {
          value: "London",
          label: "London"
        },
        {
          value: "Sydney",
          label: "Sydney"
        },
        {
          value: "Ottawa",
          label: "Ottawa"
        },
        {
          value: "Paris",
          label: "Paris"
        },
        {
          value: "Canberra",
          label: "Canberra"
        }
      ],
      model1: ""
    };
  },
  template: null,
  components: {
    bfield,
    bform
  },
  methods: {
    click() {
      this.model1 = null;
    }
  }
};
</script>